"""
@File  :iot_open_box_test.py
@Author:王世锋
@Date  :2022/7/2915:43
@Desc  :
"""

import requests
import json
import time
from app_info import *

data = {
    "device_number": device_number,
    "qr": "https://cabinet.bestwond.com/api/wx/device?app=%s" % device_number,
    "device_address": "Nayao",
    "app_kf_mobile": "17629726556",
    "timestamps": int(time.time()),
    "app_id": app_id
}
headers = {
        'Content-Type': 'application/json'
}
sign = create_sign(data, app_secret)
res = requests.post(api_host + "/api/iot/send/device/basic/info/?sign=%s" % sign, data=json.dumps(data), headers=headers)

print(sign)
print(res.status_code)
print(res.text)
print(res.json())